package com.funtl.framework.java.exception;

import org.apache.log4j.Logger;
import org.apache.log4j.MDC;

/**
 * 
 * @author lwm
 *
 */
public class DaoException extends RuntimeException {
	private static final long serialVersionUID = 287400088281099070L;
	private static Logger logger = Logger.getLogger(DaoException.class);

	public DaoException() {
		super();
	}

	public DaoException(String message, Throwable cause) {
		super(message, cause);
		MDC.put("exception", message);
		logger.error(cause.getMessage(), cause);
	}

	public DaoException(String message) {
		super(message);
	}

	public DaoException(Throwable cause) {
		super(cause);
	}
	
}
